<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>grayplot_properties</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Data type</center>
    <div align="right">Last update : 06/12/2005</div>
    <p>
      <b>grayplot_properties</b> - description of the grayplot
  entities properties</p>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>The Grayplot entity is a leaf of the graphics entities hierarchy. It
    represents 2D plots of surface using colors and images (see
    <tt>
        <b>grayplot</b>
      </tt>, <tt>
        <b>Sgrayplot</b>
      </tt>, <tt>
        <b>fgrayplot</b>
      </tt> and
    <tt>
        <b>Sfgrayplot</b>
      </tt>).</p>
    <dl>
      <dd>
        <b>parent: </b>This property contains the handle of the parent. The parent of the
        grayplot entity should be of the type <tt>
          <b>"Axes"</b>
        </tt>.</dd>
      <dd>
        <b>children: </b>This property contains a vector with the <tt>
          <b>children</b>
        </tt> of
        the handle. However, <tt>
          <b>grayplot</b>
        </tt> handles currently do not
        have any <tt>
          <b>children</b>
        </tt>.</dd>
      <dd>
        <b>visible: </b>This field contains the <tt>
          <b>visible</b>
        </tt> property value for
        the entity . It should be <tt>
          <b>"on" </b>
        </tt> or <tt>
          <b>"off"</b>
        </tt> .
        By default, the plot is visible, the value's property is
        <tt>
          <b>"on"</b>
        </tt>. If <tt>
          <b>"off"</b>
        </tt> the plot is not drawn on the
        screen.</dd>
      <dd>
        <b>data: </b>This field defines a <tt>
          <b>tlist</b>
        </tt> data structure of type
        <tt>
          <b>"grayplotdata"</b>
        </tt> composed of a row and column indices of
        each element : the x and y grid coordinates are contained respectively
        in <tt>
          <b>data.x</b>
        </tt> and <tt>
          <b>data.y</b>
        </tt>. The complementary
        field named <tt>
          <b>data.z</b>
        </tt> is the value of the surface at the
        point <tt>
          <b>(x(i),y(j))</b>
        </tt> (scaled mode) or the centered value of
        the surface defined between two consecutive <tt>
          <b>x(i)</b>
        </tt> and
        <tt>
          <b>y(j)</b>
        </tt> (direct mode). If <tt>
          <b>data_mapping</b>
        </tt> (see
        below) is set to <tt>
          <b>"scaled"</b>
        </tt>, the entire z data is used to
        perform a color interpolation whereas, if <tt>
          <b>data_mapping</b>
        </tt>'s
        value is <tt>
          <b>"direct"</b>
        </tt>, the last line and column of the z data
        indices are ignored and the color is determined directly in the
        colormap by the indices of the submatrix
        <tt>
          <b>data.z(1:$-1,1:$-1)</b>
        </tt>.</dd>
      <dd>
        <b>data_mapping: </b>By default the value of this property is <tt>
          <b>"scaled"</b>
        </tt> :
        the indices of painting colors are proportional to the value
        <tt>
          <b>z</b>
        </tt> coordinates. In the other case, the property takes as
        value <tt>
          <b>"direct"</b>
        </tt> where the plot is a grayplot and the
        indices of painting colors are given by the data (see above).</dd>
      <dd>
        <b>user_data: </b>This field can be use to store any scilab variable in the grayplot
        data structure, and to retreive it.</dd>
    </dl>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

   set("figure_style","new") //create a figure


   m=5;n=5;
   M=round(32*rand(m,n));
   grayplot(1:m,1:n,M)

   a=get("current_axes");
   a.data_bounds=  [-1,-1;7,7]
   h=a.children

   h.data_mapping="direct";
   
   // A 2D ploting of a matrix using colors 
   xbasc()
   a=get("current_axes");
   a.data_bounds=  [0,0;4,4];
  
   b=5*ones(11,11); b(2:10,2:10)=4; b(5:7,5:7)=2;
   Matplot1(b,[1,1,3,3])  ;
  
   h=a.children
   for i=1:7
    xclick(); // click the mouse to sets Matplot data
    h.data=h.data+4;
   end
   

 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="set.htm">
        <tt>
          <b>set</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="get.htm">
        <tt>
          <b>get</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="delete.htm">
        <tt>
          <b>delete</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="grayplot.htm">
        <tt>
          <b>grayplot</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="Matplot.htm">
        <tt>
          <b>Matplot</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="Matplot1.htm">
        <tt>
          <b>Matplot1</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="graphics_entities.htm">
        <tt>
          <b>graphics_entities</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="Matplot_properties.htm">
        <tt>
          <b>Matplot_properties</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>Djalel ABDEMOUCHE &amp; F.Leray</p>
  </body>
</html>
